#include "cppTutorGlobals.h"
#include "cppTutorInheritanceSingle.h"

extern CcppTutorLog Log;

CcppTurorCompanyEmployeeManagement :: CcppTurorCompanyEmployeeManagement ()
{
}

CcppTurorCompanyEmployeeManagement :: ~CcppTurorCompanyEmployeeManagement ()
{
}

void CcppTurorCompanyEmployeeManagement :: m_Menu ()
{
    Log << "ENTER : CcppTutorCompanyEmployee :: m_Menu" << endl;
    while (m_bFlag)
    {
        #ifdef WIN32
        system ("cls");
        #else
        system ("clear");
        #endif
        cout << "-------------------------------------------------" << endl;
        cout << "            Employee Management System           " << endl;
        cout << "                 ccplusplus.com                  " << endl;
        cout << "-------------------------------------------------" << endl;
        cout << " Supported Operations                            " << endl;
        cout << endl;
        cout << endl;
        cout << " 1. Registration    -    Register a new Employee " << endl;
        cout << " 2. Search          -    Search an Employee      " << endl;
        cout << " 3. Delete          -    Remove an Employee      " << endl;
        cout << " 4. Quit the management                          " << endl;
        cout << endl;
        cout << "-------------------------------------------------" << endl;
        cout << "Please enter you choice" << endl;
        cin  >> m_nUserChoice;
        switch (m_nUserChoice)
        {
            case 1:
                cout << "Not allowed/autjorized." << endl;
                //m_RegisterEmployee ();
                //m_bFlag = true;
                break;
                
            case 2:
                m_SearchEmployee ();
                break;
              
            case 3:
                m_DeleteEmployee ();
                break;

            case 4:
                m_bFlag = false;
                break;
            default:
                cout << "Not a supported choice. You can choose again in 5 seconds" << endl;
   			#ifdef WIN32
			#else
				SLEEP (10);
			#endif
                break;
        }
    };
    Log << "EXIT  : CcppTutorCompanyEmployee :: m_Menu" << endl;
}
